package rest.jbpm.wrappers.lists;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
import rest.jbpm.wrappers.User;

@XmlRootElement(name="users")
@XmlAccessorType(XmlAccessType.PROPERTY)
@XmlType(name = "user", propOrder = {"users"})
public class UserList {
	
	private List<User> users = new ArrayList<User>();
	
	protected UserList() {
		
	}
	
	public UserList(List<org.jbpm.api.identity.User> usrs) {

        if(usrs == null) return;
		for(org.jbpm.api.identity.User usr : usrs)
			users.add(new rest.jbpm.wrappers.User(usr));

	}
	
	@XmlElement(name="user",required=true)
	public List<User> getUsers() {
		return users;
	}

}
